package com.probox.common.entity.service.customer;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.probox.common.entity.domain.customer.CustomerFundDetail;
import com.probox.common.entity.vo.customerService.CustomerServiceBuyRecordVo;
import com.probox.customer.api.domain.CustomerFundVo;
import com.probox.common.entity.domain.customer.CustomerFund;
import com.probox.order.api.domain.OrderQuery;

/**
 * 客户收益Service接口
 *
 * @author zsy
 * @date 2021-06-18
 */
public interface ICustomerFundService extends IService<CustomerFund> {


    public int sendJiFen(String sendType,Long customerUid);

    public Long countJiFen(OrderQuery query);

    /**
     * 修改客户总资金
     *
     * @param record
     */
    public void updateFundByCardWithdrawal(CustomerServiceBuyRecordVo record);

    /**
     * 查询客户收益
     *
     * @param fundUid 客户收益ID
     * @return 客户收益
     */
    public CustomerFund selectCustomerFundById(Long fundUid);

    /**
     * 通过客户ID获取客户资金信息
     *
     * @param customerId
     * @return
     */
    public CustomerFund getByCustomerId(Long customerId);

    public void confirmDeduction(CustomerFundDetail detail);

    /**
     * 扣减客户资金信息
     *
     * @param fund
     * @return
     */
    public int deductionCustomerFund(CustomerFundVo fund);

    /**
     * 增加客户资金信息
     *
     * @param fund
     * @return
     */
    public int addCustomerFund(CustomerFundVo fund);

    /**
     * 查询客户收益列表
     *
     * @param customerFundvo 客户收益
     * @return 客户收益集合
     */
    public List<com.probox.common.entity.vo.customer.CustomerFundVo> queryList(com.probox.common.entity.vo.customer.CustomerFundVo customerFundvo);


    /**
     * 新增客户收益
     *
     * @param customerFund 客户收益
     * @return 结果
     */
    public boolean insertCustomerFund(CustomerFund customerFund);

    /**
     * 收到扣除
     * @param fundVo
     * @return
     */
    public String deductCustomerFund(CustomerFundVo fundVo);

    /**
     * 修改客户收益
     *
     * @param customerFund 客户收益
     * @return 结果
     */
    public boolean updateCustomerFund(CustomerFund customerFund);

    /**
     * 批量删除客户收益
     *
     * @param fundUids 需要删除的客户收益ID
     * @return 结果
     */
    public boolean deleteCustomerFundByIds(Long[] fundUids);

    public int setProfitInvalid(Long orderUid);
}
